import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import App from './App.vue'

import router from './router'

// 引入注册脚本
import 'virtual:svg-icons-register'
import SvgIcon from '@/components/SvgIcon.vue'


const app = createApp(App)
app.use(createPinia())

app.use(router)
app.use(ElementPlus, { size: 'small', locale: zhCn })
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.component('svg-icon', SvgIcon)
app.mount('#app')
